package com.yp.lession52.aop;

import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;
import java.util.Arrays;

public class MyBeforeAdvice implements MethodBeforeAdvice {
    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        System.out.println("前置增强");
        System.out.println("开启事务");
        System.out.println("增强方法名称"+method.getName());
        System.out.println("增强方法参数列表"+Arrays.toString(args));
    }
}
